﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Linq;
using System.ServiceProcess;
using System.Text;

namespace Fantacid303.ProcessAffinityControl.Service
{
	public partial class ProcessControlService : ServiceBase
	{
		private ProcessManager manager = null;

		public ProcessControlService()
		{
			InitializeComponent();
		}

		protected override void OnStart(string[] args)
		{
			this.manager = new ProcessManager();
			this.manager.Start();
		}

		protected override void OnStop()
		{
			this.manager.Shutdown();
		}

		[Conditional("DEBUG")]
		public void StartService()
		{
			this.OnStart(new string[0]);
			
		}
		[Conditional("DEBUG")]
		public void StopService()
		{
			this.OnStop();
		}

	}
}
